package com.xtoad.demo.rpc.api.service;

import com.xtoad.demo.rpc.api.entity.User;
import org.springframework.web.bind.annotation.PathVariable;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * 用户服务类
 *
 * @author xtoad
 * @date 2021-10-14
 */
@Path("/user")
@Consumes({MediaType.APPLICATION_JSON})
@Produces({"application/json;charset=UTF-8"})
public interface UserService {

    /**
     * 根据ID获取用户信息
     *
     * @param id 用户ID
     * @return 用户信息
     */
    @GET
    @Path("/{id}")
    User getUserById(@PathParam("id") Integer id);
}
